package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IndexService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

import static com.ruoyi.common.core.domain.AjaxResult.success;

/**
 * @Title: IndexController
 * @Author lqk
 * @Package com.ruoyi.web.controller.system
 * @Date 2024/4/26 11:15
 * @description:
 */
@RestController
@RequestMapping("/index")
public class IndexController {

    @Resource
    private IndexService indexService;

    @GetMapping("/getIndexData")
    public AjaxResult getInfo() {
        Map<String, Object> map = indexService.panelGroup();
        return success(map);
    }

    @GetMapping("/getLinChartIndex")
    public AjaxResult getLinChartIndex() {
        Map<String, Object> map = indexService.getLinChartIndex();
        return success(map);
    }

    @GetMapping("/getMonIndex")
    public AjaxResult getMonIndex() {
        Map<String, Object> map = indexService.getMonIndex();
        return success(map);
    }

    @GetMapping("/getYearIndex")
    public AjaxResult getYearIndex() {
        Map<String, Object> map = indexService.getYearIndex();
        return success(map);
    }

}
